<script setup lang="ts">
defineProps<{
  fullscreen?: boolean
  text?: string
  size?: 'small' | 'default' | 'large'
}>()
</script>

<template>
  <div class="loading-wrapper" :class="{ 'is-fullscreen': fullscreen }">
    <el-loading :text="text || '加载中'" :size="size" v-show="true" />
  </div>
</template>

<style scoped>
.loading-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  width: 100%;
}

.is-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.8);
  z-index: 2000;
}
</style> 